package com.jprocms.module.cms.service.accessstatistics;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.Page;
import com.jprocms.module.cms.controller.admin.accessstatistics.vo.AccessStatisticsListReqVO;
import com.jprocms.module.cms.dal.dataobject.accessstatistics.AccessStatisticsDO;
import org.springframework.lang.Nullable;

import java.util.List;

/**
 * 访问统计 Service 接口
 *
 * @author jprocms
 */
public interface AccessStatisticsService extends IService<AccessStatisticsDO> {

    /**
     * 获得访问统计列表, 用于 Excel 导出
     *
     * @param exportReqVO 查询条件
     * @return 访问统计列表
     */
    List<AccessStatisticsDO> getAccessStatisticsList(AccessStatisticsListReqVO exportReqVO);

    List<AccessStatisticsDO> statByDate(Long siteId, Integer type, @Nullable String begin, @Nullable String end);

    Page<AccessStatisticsDO> statByDate(Long siteId, Integer type, @Nullable String begin, @Nullable String end,
                                        int page, int pageSize);

    List<AccessStatisticsDO> selectFullList(@Nullable Long siteId, @Nullable Integer type, String begin, String end);

    void deleteBeforeDateString(String dataString);

    void deleteByDateString(String dateString, @Nullable Integer type);

}
